interface TitleProps {
  title: string;
  setTitle: (title: string) => void;
  style?: React.CSSProperties; // 可选属性
}
import { Button } from "antd";
export default function Title({ title, style, setTitle }: TitleProps) {
  return (
    <>
      <h1 style={style}>{title}</h1>
      <Button onClick={() => setTitle("New Title" + Math.random())}>
        Change Title
      </Button>
    </>
  );
}
